package com.bosssoft.service;

import com.aliyun.oss.model.OSSObject;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * @author Aria
 */
public interface AliOssService {

     //下载
     OSSObject downLoadImage(String fileName);

    //创建存储空间
    void createBucket();

    /**
     * 上传文件
     * @param file
     * @return
     */
    String upload(MultipartFile file);

    void download(String fileName) throws IOException;

    /**
     * 列举文件
     */
    void listFile();

    /**
     * 删除文件
     * @param fileName
     */
    void deleteFile(String fileName);

    byte[] getBytes(String url);
}
